Proposal: Reorganize the codebase - #262
Conversation
This one is sort of weird since it gets called in server.ts
1c7bf40 to
43e6988
Compare
Twixes
left a comment
There was a problem hiding this comment.
I broadly agree. My only two notes are:
- I think it's a bit awkward that
src/celery/worker.tsgot pulled out of thecelerydirectory intosrc/main/ingestion/celery-queue-worker.ts, especially considering that thecelerydirectory used to be a whole separate package. The analogy to the Kafka queue is good though. - Most of
src/server.tsended up insrc/main/pluginsServer.ts, but not all of it. I think we should keep that file intact instead, as basically it's allPluginsServer.
However in any case I'd wait for @mariusandra's input on this too before merging.
|
Thanks for the feedback. Both of these were motivated by trying to keep
|
|
Regarding these discussed points:
|
mariusandra
left a comment
There was a problem hiding this comment.
Approved. Some merge conflicts though.
…ver#262) * Move schedule.ts under src/main * Move queue.ts under src/main * Move kafka-queue logic under src/main * Move ingest-event file * Move web/server under main.ts * Move plugins code under src/worker * Move vm code under src/worker * Move celery worker under src/main * move process-event under src/worker This one is sort of weird since it gets called in server.ts * Move src/celery under src/shared * Move remaining src/ingestion under src/shared * move utils under src/shared * Move some top-level code under shared * Move main pluginsserver code under src/main * Fix typeerror in tests * Move createServer under src/shared * Rename celery worker to be ingestion-specific * Fix another package.json import * Fix process-event import
Overview
This PR moves code along the lines proposed in #261. I find it makes it much easier to follow the code flow - what code is being executed in workers, what in main threads and what everywhere.
No real behavioral changes here, just moving files. Some minor changes:
src/main/pluginsServerandsrc/shared/serversrc/main/ingestion/celery-queue-worker. This avoids confusion withworkerthreads.The eventual goal would be to make
src/sharedas tiny as possible and move everything else under specific subfolders.Resolves #47.
Commits
Checklist